let loginVue = new Vue({
    el:'.login_box',
    data:{
        username:'',
        password:'',
        checkCode:''
    },
    methods:{
        login:function () {
            axios({
                url:`common/login`,
                params:{"username":this.username,
                    "password":this.password,
                    "checkCode":this.checkCode}
            }).then(response => {
                //跳转到主页
                if(response.data.success){
                    // 转成String类型后保存到浏览器端
                    location.href="/netctoss/index.html"
                }else{
                    layer.msg(response.data.msg);
                }
            }).catch(error =>{
                layer.msg(error.message);
            })
        }
    }});